/**
 * Description:
 * Class Name:ExtractFromAnnotation
 * Date:2022/4/23 17:33
 *
 * @author LTisme
 * @version JAVA17
 */
package 疯狂Java讲义.第14章_Annotation注解._14_3_自定义注解._14_3_2_提取注解信息;

import java.lang.annotation.Annotation;

@LittleUseAnnotation
class Basic{}

public class ExtractFromAnnotation extends Basic{
    public static void main(String[] args) throws Exception{
        // 获取本程序中程序元素上存在的所有注解
        Annotation[] annotations = Class.forName("疯狂Java讲义.第14章_Annotation注解._14_3_自定义注解._14_3_2_提取注解信息.LittleUseAnnotation").getAnnotations();

        for (var an :
                annotations) {
            System.out.println(an);
        }
    }
}
//@java.lang.annotation.Target({TYPE})
//@java.lang.annotation.Retention(RUNTIME)
//@java.lang.annotation.Inherited()